<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>

<canvas id="webgl" width="400" height="400"></canvas>

<script>
(function(){
    var canvas = document.getElementById('webgl');
    var gl = canvas.getContext('webgl');

    // 指定清空 canvas 的颜色
    gl.clearColor(0.0, 0.0, 0.0, 1.0);
    // 清空 canvas
    gl.clear(gl.COLOR_BUFFER_BIT);

})();
</script>
</body>
</html>
